package com.docMan.service;

import java.io.File;
import java.util.List;

import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.docMan.dao.pojo.DocBook;

@Path("/DocBookService")
@Produces({MediaType.APPLICATION_JSON})
public interface DocBookService extends BaseService<DocBook> {
	
	@Path("/addBook")
	@POST
	abstract String createBook(@FormParam("bookName")String bookName,@FormParam("bookId")int bookId,@FormParam("imagefilePaths")List<String> imagefilePaths,@FormParam("orderId")int orderId,@FormParam("filePaths")List<String> filePaths);
	
	@POST
	@Path("/delBook")
	abstract String delBook(@FormParam("bookId")int bookId);
	
	@POST
	@Path("/editBook")
	abstract String editBook(@FormParam("bookId")int bookId,@FormParam("bookName") String bookName);
	
	@GET
	@Path("/getBook/{bookId}")
	@Produces({"application/pdf",MediaType.APPLICATION_JSON})
	abstract File getBook(@PathParam("bookId") int bookId);
}
